Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Add support for ShipModul Miniplex Latest Firmware #234

Merged
merged 9 commits into from
May 2, 2023

Conversation

jprotzman
Copy link
Contributor

The ShipModul Miniplex has added a field to the PSMDST message to indicate sending to 'C' or receiving from 'R' the SeaTalk network. This change adds support for the new field by looking for the 'R' field then parsing the data accordingly.

ShipModul now uses C and R in their PSMDST message to represent a message being sent or received.
ShipModul now includes an R for receive data in the PSMDST sentence.
This change checks for a new field 'R' in the PSMDST message. This field has been added to the ShipModul Miniplex firmware and indicates that the messages is received from the ST network.
The newest firmware of ShipModul Miniplex adds 'R' after the PSMDST to indicate that the message has been received from the ST network.
test/seatalk.js Outdated
@@ -53,7 +53,7 @@ const should = chai.Should()
chai.use(require('chai-things'))

describe('seatalk', () => {
;['$PSMDST,', '$STALK,'].forEach((prefix) => {
;['$PSMDST', '$PSMDST_R', '$STALK,'].forEach((prefix) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understood this PR correctly this test is not really relevant: it now tests the normal input format, but for PSMDST_R. Shouldn't we actually add a test where input does indeed have the extra R in the data?

Does the parser ever see the C data?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought this test was testing all of the typical input formats. It previously had both $PSMDST and $STALK which are typical from various devices. The new Miniplex firmware adds the _R for all received data so this test just adds that option as well.

Also, the _C field may appear at the parser but I cannot imagine these would ever need to be parsed since they are sent messages meant to go onto the ST network.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Several different things:

  • You added support to a new data format, where the first (optional) data field has valueR. That looks like it works, but none of the tests exercise it - you are running the tests that were already in place, with exact the same data fields as previously, no R field, just for an additional prefix
  • the tests do not pass for PSMDST prefix because you deleted the trailing comma in the prefix value (see the diff above, it is highlighted)
  • the tests do not pass for PSMDST_R prefix because there is no trailing comma in the new prefix value

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be corrected now.

@tkurki
Copy link
Member

tkurki commented Dec 26, 2022

Is this PR still alive?

@tkurki tkurki added the feature label Dec 26, 2022
@jprotzman
Copy link
Contributor Author

Apologies for the slow response.

hooks/proprietary/PSMDST.js Outdated Show resolved Hide resolved
hooks/proprietary/PSMDST.js Show resolved Hide resolved
@tkurki
Copy link
Member

tkurki commented Feb 14, 2023

Still there?

@jprotzman
Copy link
Contributor Author

Yes still here. Just haven't had time to review yet.

@tkurki tkurki merged commit 99635ce into SignalK:master May 2, 2023
@tkurki tkurki changed the title Added support for ShipModul Miniplex Latest Firmware feature: Add support for ShipModul Miniplex Latest Firmware May 2, 2023
@tkurki
Copy link
Member

tkurki commented May 2, 2023

If you have any more details than "latest firmware", like the exact version when the R was added and links to Miniplex documentation feel free to add to the PR description or as a comment here. This PR will be linked from the release notes, so somebody might even check details here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants